/**
 * 
 */
package grid;

/**
 * @author Darko
 * 
 */
public class CollectorNode
        extends Node {

    int islands;
    int epochs;
    static final String CLASS = "grid.Collector";

    public CollectorNode(int islands, int epochs) {
        this.islands = islands;
        this.epochs = epochs;
        this.name = "Collector";
    }

    public String getArguments() {
        return "\"" + ((argumentsPrefix != null) ? (argumentsPrefix + " ") : "") + CLASS + " " + islands + " " + epochs + "\"";
    }

    public String getInputSandbox() {
        StringBuilder domains = new StringBuilder();
        domains.append("root.nodes." + inputNodes.get(0).getName() + ".description.OutputSandbox[0]");
        for (int i = 1; i < inputNodes.size(); i++) {
            domains.append(", root.nodes." + inputNodes.get(i).getName() + ".description.OutputSandbox[0]");
        }
        return "{" + domains + ", root.InputSandbox}";
    }

    public String getOutputSandbox() {
        return "{\"" + Collector.OUTPUT_FILENAME + "\"}";
    }
}
